package com.shop.mapper;

import com.shop.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    /**
     * 查询所有角色
     * @return List<SysRole>
     */
     List<SysRole> findAllRole();

    /**
     * 查询角色有的权限
     * @param map
     * @return
     */
   List<SysRole> findRolePerssionOrByRoleName(Map<String,Object> map);
    /**
     * 查询角色有的权限个数
     * @param map
     * @return
     */
    Integer findRolePerssionOrByRoleNameCount(Map<String,Object> map);

}